package com.blog.exception;

public enum ExceptionEnum implements BaseErrorInfoInterface {
    SUCCESS("1", "成功!"),
    INTERNAL_SERVER_ERROR("601", "服务器内部错误!"),
    EMPTY_EMAIL("602", "邮箱不能为空"),
    ERROR_EMAIL_FORMAT("603", "错误的邮箱格式"),
    INVALID_ACCOUNT("604", "账号已冻结，有问题请联系管理员"),
    ERROR_EMAIL_OR_PASSWORD("605", "邮箱或密码错误"),
    NOT_MODIFIED("606", "未作出任何修改"),
    EMPTY_PASSWORD("607", "密码不能为空"),
    EMPTY_CONDITION("608", "查询条件不能为空"),
    DUPLICATE_EMAIL("609", "邮箱已注册"),
    DUPLICATE_USERNAME("610", "用户名已存在"),
    EMPTY_USERNAME("611", "用户名不能为空"),
    ERROR_OLDPASSWORD("612", "原密码错误"),
    NOT_LOGIN("613", "用户未登录"),
    INVALID_LOGIN("614", "登录信息失效"),
    NOT_REGISTER("615", "邮箱未注册"),
    INVALID_SUPPORT("616", "已点赞过这篇文章"),
    EMPTY_TITLE("701","标题不能为空"),
    EMPTY_CONTENT("702","内容不能为空"),
    EMPTY_TAG("704","标签不能为空"),
    EMPTY_TAGNAME("705","标签名不能为空"),
    EMPTY_DATA("801","找不到数据");

    private final String resultCode;
    private final String resultMsg;

    ExceptionEnum(String resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }

    @Override
    public String getResultCode() {
        return resultCode;
    }

    @Override
    public String getResultMsg() {
        return resultMsg;
    }
}
